Functional Reading of Logic Programs
نویسندگان
چکیده
We propose an embedding of logic programming into lazy functional programming in which each predicate in a Prolog program becomes a Haskell function, in such a way that both the declarative and the procedural reading of the Prolog predicate are preserved. The embedding computes by means of operations on lazy lists. The state of each step in computation is passed on as a stream of answer substitutions, and all the logic operators of Prolog are implemented by explicit Haskell operators on these streams. The search strategy can be changed by altering the basic types of the embedding and the implementation of these operators. This model results in a perspicuous semantics for logic programs, and serves as a good example of modularisation in functional programming.
منابع مشابه
Embedding Prolog in Haskell
The distinctive merit of the declarative reading of logic programs is the validity of all the laws of reasoning supplied by the predicate calculus with equality Surprisingly many of these laws are still valid for the procedural reading they can therefore be used safely for algebraic manipulation program transformation and optimisation of executable logic programs This paper lists a number of co...
متن کاملTowards the Global Optimization of Functional Logic Programs
Functional logic languages amalgamate functional and logic programming paradigms. They can be eeciently implemented by extending techniques known from logic programming. In this paper we show how global information about the call modes of functions can be used to optimize the compilation of functional logic programs. Since mode information has been successfully used to improve the implementatio...
متن کاملThe Relationship between English and Persian Phonological Awareness, Rapid Autamatized Naming and Students’ Reading Achievement in Partial Immersion and Non-Immersion Programs
The cognitive predictors (i.e.,Phonological Awareness, and Rapid Automatized Naming) underlying reading achievement have not been researched in Iranian partial English immersion and non-immersion programs. The present study sought to investigate the relationship between English and Persian Phonological Awareness (PA), Rapid Autamatized Naming (RAN) and reading achievementof Iranian students in ...
متن کاملSpecialization of Functional Logic Programs Based on Needed Narrowing Specialization of Functional Logic Programs Based on Needed Narrowing
Functional logic languages with a complete operational semantics are based on narrowing, a uniication-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal narrowing strategy and the basis of several recent functional logic languages. In this paper, we deene a partial evaluator ...
متن کاملDefault Rules in Functional Logic Programs ⋆
In functional logic programs, rules are applicable independently of textual order, i.e., any rule can potentially be used to evaluate an expression. This is similar to logic languages and opposite to functional languages, e.g., Haskell enforces a strict sequential interpretation of rules. However, in some situations it is convenient to express alternatives by means of compact default rules. Alt...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. UCS
دوره 6 شماره
صفحات -
تاریخ انتشار 2000